package com.umeox.watch.moto.dataservice.db.model;

import androidx.annotation.NonNull;
import androidx.room.Entity;
import androidx.room.Ignore;
import androidx.room.PrimaryKey;

/**
 * Created by Rambo 2024/5/28/0028
 * Describe: 群聊信息表
 */
@Entity(tableName = IMGroup.TABLE_NAME)
public class IMGroup {
    @Ignore
    public static final String TABLE_NAME = "im_group";
    @NonNull
    @PrimaryKey
    private String id; //群聊ID

    private int type; //0:家庭群聊    //1:APP群聊    //2:设备群聊

    private String name;//群聊名称

    private String avatar;//群聊头像

    private int createTime;//创建时间 秒


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public int getCreateTime() {
        return createTime;
    }

    public void setCreateTime(int createTime) {
        this.createTime = createTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof IMGroup)) return false;

        IMGroup imGroup = (IMGroup) o;

        return id == imGroup.id;
    }

    @Override
    public int hashCode() {
        return String.valueOf(id).hashCode();
    }

    @Override
    public String toString() {
        return "IMGroup{" +
                "id='" + id + '\'' +
                ", type=" + type +
                ", name='" + name + '\'' +
                ", avatar='" + avatar + '\'' +
                ", createTime=" + createTime +
                '}';
    }
}
